/*
 * @Author: pengtianrui 2276608413@qq.com
 * @Date: 2024-08-26 17:01:17
 * @LastEditors: pengtianrui 2276608413@qq.com
 * @LastEditTime: 2024-08-30 15:12:53
 * @FilePath: \SGFEM\DataStructure\FEM\Load\src\PLOAD4Data.cpp
 */
#include "DataStructure/Input/Load/PLOAD4Data.h"

#include "DataStructure/Common/Validation.h"

using namespace SG::DataStructure;

bool SG::DataStructure::FEM::operator== (const PLOAD4Data& a, const PLOAD4Data& b)
{
    if (a.m_sId != b.m_sId)
    {
        return false;
    }
    if (a.m_eId != b.m_eId)
    {
        return false;
    }
    if (a.m_cId != b.m_cId)
    {
        return false;
    }
    if (a.m_G1 != b.m_G1)
    {
        return false;
    }
    if (a.m_G34 != b.m_G34)
    {
        return false;
    }
    for (int i = 0; i < 4; ++i)
    {
        if (!SG::DataStructure::Common::isNear (a.m_P[i], b.m_P[i]))
        {
            return false;
        }
    }
    for (int i = 0; i < 3; ++i)
    {
        if (!SG::DataStructure::Common::isNear (a.m_N[i], b.m_N[i]))
        {
            return false;
        }
    }
    for (int i = 0; i < 8; ++i)
    {
        if (a.m_sorl[i] != b.m_sorl[i])
        {
            return false;
        }
    }
    for (int i = 0; i < 8; ++i)
    {
        if (a.m_ldir[i] != b.m_ldir[i])
        {
            return false;
        }
    }
    if (a.m_domainId != b.m_domainId)
    {
        return false;  // NOLINT(readability-simplify-boolean-expr)
    }
    return true;
}